<?php $this->_extends('_layouts/default_layout'); ?>
 
<?php $this->_block('contents'); ?>

<span><a href="<?php echo url('user/AddMember'); ?>">企业用户添加</a> | <a href="<?php echo url('user/manage'); ?>">企业用户管理</a><?php if ($current_user->permission_id == 1): ?> | <a href="<?php echo url('user/AddManager'); ?>">电信管理员添加</a> | <a href="<?php echo url('user/tianyimanage'); ?>">电信管理员管理</a><?php endif; ?>	</span>


<form action="<?php echo url('user/AddMember'); ?>" method="post" name="mainform" enctype="multipart/form-data" 
        onsubmit="
		if (this.username.value == '') { 
		alert('请输入用户名'); 
		return false; }
		else { 
			if (this.userpasswd.value == '') 
			{ 
			alert('请输入用户密码'); 
			return false; 
			}
			return true; 
		}"
		>
	<table cellpadding="0" cellspacing="0" width="100%">
	<tbody class="">
	<tr>
		<td><span class="defaultbold">用户名</span></td>
		<td><input class="input" type="text" value="" onBlur="CheckNameIsNull()" name="username" id="10011" size="36" /><span class="tip" name="tip">请使用手机号码作为用户名</span><span class="error" name="warn_name" style="display:none" id="10012">-请输入用户名</span></td>
	</tr>
	<tr>
		<td><span class="defaultbold">用户密码</span><br /></td>
		<td><input class="input" type="text" value="" name="userpasswd" onBlur="CheckPasswdIsNull()" id="10013" size="36" /><span class="error" name="warn_pass" style="display:none" id="10014">请输入用户密码</span></td>
	</tr>

	<tr>
		<td class="tbutton" colspan="6"><input type="submit" onclick="return(CheckFirst())" value="提交" class="btn" name="submit">&nbsp;		
		</td>
	</tr>
	</tbody>
	</table>
</form>

<script>
	function   LTrim(str)           //   左空格 
	{   
			var   i=0;  
			for(i=0;i <str.length;i++)   
			{   
			if(str.charAt(i)!= "   "&&str.charAt(i)!= "   ")break;
			}   
			str=str.substring(i,str.length);   
			return   str;   
	}   
	function   Trim(str)     //   两边空格 
	{   
			return   LTrim(str);   
	}  


    function CheckNameIsNull()
	{
        var name = document.getElementById("10011");
		if("" == name.value || Trim(name.value)== " ")
		{				
			var objSrc = document.getElementById("10012");
			objSrc.style.display = "";
		} 
		else
		{
			var objSrc = document.getElementById("10012");
			objSrc.style.display = "none";
		}
	}

    function CheckPasswdIsNull()
	{
        var name = document.getElementById("10013");
		if("" == name.value || Trim(name.value)== " ")
		{				
			var objSrc = document.getElementById("10014");
			objSrc.style.display = "";
		} 
		else
		{
			var objSrc = document.getElementById("10014");
			objSrc.style.display = "none";
		}
	}
	function CheckFirst()
	{
	    var count=0;
		return true;
	}
	function CheckSelectedID(id)
	{
		if(id == 1)
		{
			var objSrc = document.getElementById("2002");
			objSrc.style.display = "none";
		}
		else
		{
		}
	}
</script>



<?php $this->_endblock(); ?>
